package linkedlist;

/**
 * @author : Rookie
 * @description : 单链表排序
 * @date : 2023/10/15
 */
public class LinkedListSort {

    public static void main(String[] args) {
        int[] input = new int[]{2,1,4,12,5,3,2,7};
        Node head = new Node(input[0]);
        Node curr = head;
        for (int i = 1; i < input.length; i++) {
            curr.next = new Node(input[i]);
            curr = curr.next;
        }
    }

    private static Node bubbleSort(Node head) {
        // 链表为空或者只有1个元素 直接返回
        if (head == null || head.next == null) {
            return head;
        }
        return new Node(0);
    }
}
